package com.hylanda.va.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.hylanda.va.entity.TCost;

/** 
 * @author zhangy
 * @E-mail:blackoon88@gmail.com 
 * @qq:846579287
 * @version created at：2018年5月24日 下午4:27:40 
 * note
 */
@Repository
public interface TCostRepository extends JpaRepository<TCost, Integer>,
		JpaSpecificationExecutor<TCost> {
	
		public List<TCost> findByCostMonth(String costMonth);
		
		public int countByCostMonth(String costMonth);
		
		@Transactional
		public int deleteByCostMonth(String cost_month);
		
//		@Modifying
//		@Query("delete from ChoiceAnswer c where c.question.id=?1 ")
//		@Transactional
//		int deleteByQuestionId(Integer questionId);
		
}
